﻿using System;
using FreeSql.DataAnnotations;

namespace Colorful.Furniture.PermissionManagement
{
    /// <summary>
    ///  系统接口
    /// </summary>
    [Table(Name = "sys_api")]
    public class SysApi
    {
        /// <summary>
        /// 编码
        /// </summary>
        [Column(Name = "id", IsPrimary = true)]
        public Guid Id { get; set; }

        /// <summary>
        ///  授权方式
        /// </summary>
        [Column(Name = "authorization_type")]
        public int AuthorizationType { get; set; }

        /// <summary>
        ///  授权方式名字
        /// </summary>
        [Column(Name = "authorization_type_name", StringLength = 15)]
        public string AuthorizationTypeName { get; set; }

        /// <summary>
        ///  区域标题
        /// </summary>
        [Column(Name = "area_title", StringLength = 50)]
        public string AreaTitle { get; set; }

        /// <summary>
        ///  区域代码
        /// </summary>
        [Column(Name = "area_code", StringLength = 50)]
        public string AreaCode { get; set; }

        /// <summary>
        ///  控制器标题
        /// </summary>
        [Column(Name = "controller_title", StringLength = 50)]
        public string ControllerTitle { get; set; }

        /// <summary>
        ///  控制器标题
        /// </summary>
        [Column(Name = "controller_code", StringLength = 50)]
        public string ControllerCode { get; set; }

        /// <summary>
        ///  操作代码
        /// </summary>
        [Column(Name = "action_code", StringLength = 50)]
        public string ActionCode { get; set; }

        /// <summary>
        ///  操作标题
        /// </summary>
        [Column(Name = "action_title", StringLength = 50)]
        public string ActionTitle { get; set; }

        /// <summary>
        ///  排序
        /// </summary>
        [Column(Name = "sort")]
        public int Sort { get; set; }

        /// <summary>
        ///  路由
        /// </summary>
        [Column(Name = "route", StringLength = 200)]
        public string Route { get; set; }

        /// <summary>
        ///  描述[区域-控制器-操作(自定义描述)]
        /// </summary>
        [Column(Name = "description", StringLength = 500)]
        public string Description { get; set; }

        /// <summary>
        ///  是否删除
        /// </summary>
        [Column(Name = "is_deleted")]
        public bool IsDeleted { get; set; }

        /// <summary>
        ///  是否不需要自动从程序同步
        /// </summary>
        [Column(Name = "is_sync")]
        public bool IsNotSync { get; set; }

        /// <summary>
        ///  更新时间
        /// </summary>
        [Column(Name = "modify_time")]
        public DateTime? ModifyTime { get; set; }
    }
}